package design_pattern.ProductConsumeMode;

/**
 * @Author: 蔡翔
 * @Date: 2019/11/15 9:35
 * @Version 1.0
 * (重要)
 */
public class ProducerAndConsumerClient {
    public static void main(String[] args) {
        final MessageQueue messageQueue = new MessageQueue();
        new ProducerThread(messageQueue,1).start();
        new ProducerThread(messageQueue,2).start();
        new ProducerThread(messageQueue,3).start();
        new ConsumerThread(messageQueue, 1).start();
        new ConsumerThread(messageQueue, 2).start();
    }
}
